﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Model;
using Model.Components;
using FrameWork;
using FrameWork.Components;
using FrameWork.WebControls;

namespace FrameWork.web.Manager.Module.Right
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Web();
            }
        }

        private void Web()
        {
            if (UserData.GetUserDate.U_GroupID==1)// 信访办
            {
                HyperLink11.Text = BusinessFacadeModel.get_table_fileds("T_Web", "count(*)", "zhuangtai", "未处理");
                HyperLink11.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}", "未处理");

                HyperLink12.Text = BusinessFacadeModel.get_table_fileds("T_Web", "count(*)", "zhuangtai", "办结");
                HyperLink12.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}", "办结");

                HyperLink13.Text = BusinessFacadeModel.get_table_fileds3("T_Web", "count(*)", "zhuangtai", "办理中", "getdate()", "XEndDate", "1", "1", "1", "1");
                HyperLink13.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}&CS=1", "办理中");
            }
            
            else  if (UserData.GetUserDate.U_GroupID == 5)//局长
            {
                HyperLink11.Text = BusinessFacadeModel.get_table_fileds2("T_Web", "count(*)", "zhuangtai", "办理中", "toLingDao", UserData.GetUserDate.UserID.ToString(), "1", "1", "1", "1");
                HyperLink11.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}", "未处理");

                HyperLink12.Text = BusinessFacadeModel.get_table_fileds2("T_Web", "count(*)", "zhuangtai", "办结", "toLingDao", UserData.GetUserDate.UserID.ToString(), "1", "1", "1", "1");
                HyperLink12.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}", "办结");

                HyperLink13.Text = BusinessFacadeModel.get_table_fileds3("T_Web", "count(*)", "zhuangtai", "办理中", "getdate()", "XEndDate", "toLingDao", UserData.GetUserDate.UserID.ToString(), "1", "1");
                HyperLink13.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}&CS=1", "办理中");
            }
            else // 县局
            {
                HyperLink11.Text = BusinessFacadeModel.get_table_fileds2("T_Web", "count(*)", "zhuangtai", "办理中", "XCLDW", UserData.GetUserDate.U_GroupID.ToString(), "1", "1", "1", "1");
                HyperLink11.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}", "未处理");

                HyperLink12.Text = BusinessFacadeModel.get_table_fileds2("T_Web", "count(*)", "zhuangtai", "办结", "XCLDW", UserData.GetUserDate.U_GroupID.ToString(), "1", "1", "1", "1");
                HyperLink12.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}", "办结");

                HyperLink13.Text = BusinessFacadeModel.get_table_fileds3("T_Web", "count(*)", "zhuangtai", "办理中", "getdate()", "XEndDate", "XCLDW", UserData.GetUserDate.U_GroupID.ToString(), "1", "1");
                HyperLink13.NavigateUrl = string.Format("~/Manager/Module/TouSu/T_Web/Default.aspx?ZT={0}&CS=1", "办理中");
            }
        }
    }
}
